{namespace fsl.ui}

/**
 * Says hello to the world.
 */
{template .helloWorld}
  Hello world from SOY!
{/template}

/**
 * Output a user's Latitude location.
 * @param location Where the user currently is.
 * @param time When the user's location was retrieved.
 */
{template .latitudeLocation}
  Latitude: Last seen at {$location} ({$time})
{/template}

/**
 * Output a user's last Foursquare checkin.
 * @param location Where the user currently is.
 * @param time When the user's location was retrieved.
 */
{template .foursquareLocation}
  Foursquare: Last seen at {$location} ({$time})
{/template}

/**
 * Output an activity in a nice format.
 * @param activity
 */
{template .tripsActivity}
<div class="activity">
  <span class="name">{$activity.venue.name}</span> - <span class="created">{$activity.created}</span><br />
  <span class="address">{$activity.venue.address}</span><br />
  <span class="locality">{$activity.venue.city}, {$activity.venue.state}</span><br />
</div>
{/template}

/**
 * Output an venue in a nice format.
 * @param venue
 */
{template .tripsVenue}
<div class="venue">
  <table>
    <tr>
      <td>
        <span class="venue-view-name">{$venue.name}</span>
      <td>
      <td>
        <div class="venue-view-rating"></div>
      </td>
    </tr>
  </table>
  <span class="address">{$venue.address}</span><br />
  <span class="locality">{$venue.city}, {$venue.state}</span><br />
  <div class="venue-view-rating"></div>
  {if $venue.comment}
    <div class="venue-view-comment">{$venue.comment}</div>
  {else}
    <div class="venue-view-comment"></div>
  {/if}
  <div class="clear"></div>
</div>
{/template}

/**
 * Create a basic venue edit form.
 * @param venue
 */
{template .venueEdit}
<div class="venue">
    <table>
      <tr>
        <td>
          <span class="name">{$venue.name}</span>
        <td>
        <td>
          <div class="venue-edit-rating"></div>
        </td>
      </tr>
    </table>
  <form class="venue-edit-form">
    <span class="address">{$venue.address}</span><br />
    <span class="locality">{$venue.city}, {$venue.state}</span><br />
    <textarea class="venue-edit-comment" placeholder="Add your comments!"></textarea>
    <input type="hidden" class="venue-edit-rating-value"></input>
  </form>
</div>
{/template}
